package com.woniuxy.staffservice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.staffservice.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    List<User> getByCondition(@Param("deptid") Integer deptid, @Param("deptname") String deptname, @Param("nickname") String nickname, @Param("address") String address
            , @Param("index") Integer index, @Param("limit") Integer limit);

    @Select("select * from sys_user where deptid=#{deptid}")
    List<User> getByDeptId(Integer deptid);
}
